package center.wxp.log.properties;

import center.wxp.log.constant.Level;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * log配置
 * @author wuxiaopeng
 * date 2020/3/12 9:43
 */
@ConfigurationProperties(prefix = "center.wxp.log")
public class LogProperties {

    /**
     * 日志打印位置（BEFORE：入参，AFTER：出参，ALL：出入参）
     */
    private String position = "ALL";

    /**
     * 日志级别：（DEBUG、INFO、WARN、ERROR）
     */
    private Level level = Level.INFO;

    /**
     * 全局打印,默认开启，关闭将不会全局打印
     */
    private boolean enabled_global_print;

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public Level getLevel() {
        return level;
    }

    public void setLevel(Level level) {
        this.level = level;
    }

    public boolean isEnabled_global_print() {
        return enabled_global_print;
    }

    public void setEnabled_global_print(boolean enabled_global_print) {
        this.enabled_global_print = enabled_global_print;
    }

    @Override
    public String toString() {
        return "LogProperties{" +
                "position='" + position + '\'' +
                ", level=" + level +
                ", enabled_global_print=" + enabled_global_print +
                '}';
    }
}
